export interface AnyObj {
    [key: string]: any
}
export interface DepTyp {
    deps: WatcherTyp[]
    addWatcher(w: WatcherTyp): void
    notify(): void
}
export type WatchCallback = (nVal?: string | number, oldVal?: string | number) => void
export interface WatcherTyp {
    vm: VmTyp,
    key: string,
    callback: WatchCallback,
    update(): void
}

export interface VmTyp {
    $el: HTMLElement,
    $data: AnyObj,
    __proxyDate(data: AnyObj): void,
    [key:string]:any
}

export interface CompleTyp {
    el: HTMLElement,
    vm: VmTyp,
    complie(el: HTMLElement): void,

    isTextNode(node: HTMLElement): boolean,
    complieTextNode(node: HTMLElement): void,

    isElementNode(node: HTMLElement): boolean,
    complieElementNode(node: HTMLElement): void,

    updater(node: HTMLElement, key: string, attrName: string): void,
    textUpdater(node: HTMLElement, key: string): void,
    modelUpdater(node: HTMLElement, key: string): void
}

export interface ObserveTyp {
    data: AnyObj,
    walk(data: AnyObj): void,
    _defineReactive(obj: AnyObj, key: string): void,
}